package ai.people.netmon.telegram.domain.response;

import lombok.ToString;
import ai.people.netmon.framework.model.response.ResultCode;

/**
 * 代码50000000
 */
@ToString
public enum TelegramCode implements ResultCode {
    TELEGRAM_DENIED_DELETE(false, 50000001, "");


    //操作代码
    boolean success;

    //操作代码
    int code;

    //提示信息
    String message;

    private TelegramCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

//    private static final ImmutableMap<Integer, TelegramCode> CACHE;
//
//    static {
//        final ImmutableMap.Builder<Integer, TelegramCode> builder = ImmutableMap.builder();
//        for (TelegramCode commonCode : values()) {
//            builder.put(commonCode.code(), commonCode);
//        }
//        CACHE = builder.build();
//    }


    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
